/*
 * @lc app=leetcode.cn id=492 lang=cpp
 *
 * [492] 构造矩形
 */

// @lc code=start
#include <bits/stdc++.h>
using namespace std;
class Solution
{
public:
    vector<int> constructRectangle(int area)
    {
        for (int i = sqrt(area); i > 0; --i)
        {
            int k = area / i;
            if(k * i == area) 
            {
                return {k, i};
            }
        }
        return {area, 1};
    }
};
// @lc code=end
